import com.sun.javaws.jnl.RContentDesc;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Repository;
import test.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2023-01-22
 * Time:13:22
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext context=new ClassPathXmlApplicationContext("spring-config.xml");
//        User user=context.getBean("user1", User.class);
//        System.out.println(user.toString());
//        ServiceTest test=context.getBean("serviceTest",ServiceTest.class);
//        System.out.println(test.user());
//        RepositoryTest repositoryTest=context.getBean("repositoryTest",RepositoryTest.class);
//        System.out.println(repositoryTest.user());
//        ControllerTest test=context.getBean("controllerTest", ControllerTest.class);
//        System.out.println(test.user());
//        ServiceTest1 serviceTest1=context.getBean("serviceTest1", ServiceTest1.class);
//        System.out.println(serviceTest1.getUser(2));
//        ControllerTest1 test=context.getBean("controllerTest1", ControllerTest1.class);
//        System.out.println(test.user(1));
//        User user=context.getBean("user4",User.class);
//        System.out.println(user.toString());
//        User user1=context.getBean("userTest",User.class);
//        System.out.println(user1.toString());
//        User user=context.getBean("userDemo",User.class);
//        System.out.println(user.toString());
        TestLife testLife=context.getBean("testLife",TestLife.class);
    }
}
